depends = webchat-interface-room \
          	webchat-interface-user \
          	webchat-utils
subdir = webchat-provider-user \
	webchat-provider-room \
	webchat-roomnode \
	webchat-web
prostaget = $(shell pwd)
.PHONY: all test clean docker
all: ${prostaget}/target
	for p in ${depends};do cd ${prostaget}/$$p && make install;done
	for p in ${subdir};do cd ${prostaget}/$$p && make;done

test:
	for p in ${depends};do cd ${prostaget}/$$p && make install;done
	for p in ${subdir};do cd ${prostaget}/$$p && make test;done
clean:
	for p in ${subdir};do cd ${prostaget}/$$p && make clean;done

${prostaget}/target:
	mkdir ${prostaget}/target

docker:
	for p in ${depends};do cd ${prostaget}/$$p && make install;done
	for p in ${subdir};do cd ${prostaget}/$$p && make docker;done
